<template>
  <div>
    <div class="tips">
      <div class="title">{{ biaoti }}</div>
      <div class="input">
        <div>
          <label for="title"
            >标题：<input id="title" v-model="info.title" type="text"
          /></label>
        </div>

        <div>
          <label for="text"
            >内容：<input id="text" v-model="info.text" type="text"
          /></label>
        </div>
      </div>
      <div class="footer">
        <button @click="fn(true)">确定</button>
        <button @click="fn(false)">取消</button>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  //   props: ["myisshow", "biaoti"],
  props: {
    myisshow: {},
    biaoti: {},
    mydata: {},
  },
  data() {
    return {
      info: {
        title: "",
        text: "",
      },
    };
  },

  methods: {
    fn(e) {
      console.log(e);

      if (e) {
        this.$emit("setshow", this.info);
      } else {
        this.$emit("setshow");
      }

      //   this.mydata.push({...info});
    },
  },
  mounted() {
    console.log(this.myisshow);
  },
};
</script>

<style scoped >
.tips {
  width: 500px;
  /* height: 300px; */
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background-color: #fff;
}
.title {
  height: 40px;
  background-color: #0000fb;
  padding: 10px;
  line-height: 20px;
  color: #fff;
  font-weight: 700;
  font-size: 18px;
}
.input {
  height: 300px;
}
.footer {
  width: 100%;
  height: 50px;
  background-color: #fafafa;
  text-align: center;
  line-height: 50px;
}
</style>